import React, { Component } from 'react'
import { HashRouter as Router, Route,Switch } from "react-router-dom"
import TabBart from "./component/tabBar/tabBar"
import Home from "./component/home/home"
import Video from "./component/video/video"

import Performance from "./component/performance/performance"
import My from "./component/my/my"
import ReDian from "./component/reDian/reDian"
import BangDan from "./component/bangDan/bangDan"
import Serch from './component/performance/serch/Serch'
import Detail from './component/performance/detail/Detail'
import List from './component/list/List'
import Artist from './component/artist/Artist'


import MyCoupon from "./component/myCoupon/MyCoupon"
import Login from "./component/login/Login"
import Register from "./component/register/Register"
import PickCinema from "./component/pickCinema/pickCinema"
import MovieDetail from "./component/movieDetail/movieDetail"

import ShortVideo from "./component/shortVideo/shortVideo"
import ShortVideos from "./component/shortVideos/shortVideos"


export default class RouterConfig extends Component {
  render() {
    return (
      <div>
        <Router>
          <Switch>
            <Route exact path="/" render={()=><TabBart><Home></Home></TabBart>}></Route>
            <Route exact path="/video" render={(props)=><TabBart><Video {...props}></Video></TabBart>}></Route>
            <Route exact path="/" render={(props)=><TabBart><Home></Home></TabBart>}></Route>
            <Route exact path="/video" render={()=><TabBart><Video></Video></TabBart>}></Route>
            <Route exact path="/" render={()=><TabBart><Home></Home></TabBart>}></Route>
            <Route exact path="/video" render={(props)=><TabBart><Video {...props}></Video></TabBart>}></Route>
            <Route exact path="/performance" render={(props)=><TabBart><Performance {...props}></Performance></TabBart>}></Route>
           
            <Route exact path="/shortVideo" render={()=><TabBart><ShortVideo></ShortVideo></TabBart>}></Route>
          <Route exact path="/shortVideos/:id" render={(props)=><ShortVideos {...props}></ShortVideos>}></Route>
           
            <Route exact path="/performance" render={()=><TabBart><Performance></Performance></TabBart>}></Route>
            <Route exact path="/my" render={(props)=><TabBart><My {...props}></My></TabBart>}></Route>
            <Route exact path="/reDian" render={()=><ReDian></ReDian>}></Route>
            <Route exact path="/bangDan" render={()=><BangDan></BangDan>}></Route>
            <Route exact path="/serch" render={(props)=><Serch {...props}></Serch>}></Route>
            <Route exact path="/detail/:performanceId" render={(props)=><Detail {...props}></Detail>}></Route>
            <Route exact path="/list" render={(props)=><List {...props}></List>}></Route>
            <Route exact path="/artist/:id/:celebrityId" render={(props)=><Artist {...props}></Artist>}></Route>
            <Route exact path="/myCoupon" render={(props)=><MyCoupon  {...props}></MyCoupon>}></Route>
            <Route exact path="/login" render={(props)=><Login {...props}></Login>}></Route>
            <Route exact path="/register" render={(props)=><Register {...props}></Register>}></Route>
            <Route exact path="/pickCinema/:movieId" render={()=><PickCinema></PickCinema>}></Route>
            <Route exact path="/movieDetail/:movieId" render={()=><MovieDetail></MovieDetail>}></Route>
          </Switch>
        </Router>
      </div>
    )
  }
}
